﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterFamily.master" AutoEventWireup="true"
    CodeFile="Statistics.aspx.cs" Inherits="Statistics" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Src="~/Controls/DayStatisticControl.ascx" TagPrefix="uc" TagName="day" %>

<asp:Content ID="content" ContentPlaceHolderID="contentPlaceHolder" runat="Server">
    <asp:UpdatePanel runat="server">
        <ContentTemplate>

            <table width="100%">
                <tr>
                    <td style="width: 30%;">
                        От:
                        <asp:TextBox ID="txtDateFrom" runat="server" AutoPostBack="true" />
                        <asp:CalendarExtender ID="calendar" runat="server" TargetControlID="txtDateFrom"
                            Format="dd-MM-yyyy" />
                    </td>
                    <td style="width: 30%;">
                        До:
                        <asp:TextBox ID="txtDateTo" runat="server" AutoPostBack="true" />
                        <asp:CalendarExtender ID="calendar2" runat="server" TargetControlID="txtDateTo" Format="dd-MM-yyyy" />
                    </td>
                    <td colspan="2" style="width: 40%;">
                        <asp:Button ID="btnShow" runat="server" OnClick="btnShow_Click" Text="Показать" />
                    </td>
                </tr>
                <tr>
                    <td style="width: 30%;">
                        Категория:
                        <asp:DropDownList ID="ddlCategory" runat="server" AutoPostBack="true" ontextchanged="ddlCategory_TextChanged" />
                    </td>
                    <td style="width: 30%;">
                        Продукт:
                        <asp:DropDownList ID="ddlProduct" runat="server" AutoPostBack="true" />
                    </td>
                    <td style="width: 20%;">
                        <asp:Button ID="btnCalculate" runat="server" OnClick="btnCalculate_Click" Text="Посчитать" />
                    </td>
                    <td style="width: 20%;">
                        Сумма:&nbsp;
                        <b><asp:Label ID="lblAmount" runat="server" /></b>
                    </td>
                </tr>
                <tr>
                    <td colspan="4">
                        <asp:Repeater ID="days" runat="server" OnItemDataBound="days_ItemDataBound">
                            <ItemTemplate>
                                <uc:day ID="day" runat="server" />
                            </ItemTemplate>
                        </asp:Repeater>
                    </td>
                </tr>
            </table>

        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
